home *** CD-ROM | disk | FTP | other *** search
-
- /* 1*/ #include <stdio.h> /* MS-DOS-specific */
-
- /* 3*/ main()
- /* 4*/ {
- /* 5*/ FILE *fp;
- /* 6*/ char filename[] = "\test.dat";
-
- /* 8*/ fp = fopen(filename, "r");
- /* 9*/ if (fp == NULL)
- /*10*/ printf("Can't open file %s\n", filename);
- /*11*/ else {
- /*12*/ printf("File open\n");
- /*13*/ fclose(fp);
- /*14*/ }
- /*15*/ }
-
-
- Output
-
- Can't open file est.dat
-
-